<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<jsp:useBean id="array" scope="page" class="bean.AllBean"/>
<jsp:include flush="true" page="/admin/top.jsp"/>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
ArrayList adminlogin = (ArrayList)session.getAttribute("adminlogin");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<%
if(adminlogin == null || adminlogin.size() == 0){
	%><script>alert('您还没有登录!');window.navigate('<%=path %>/admin/index.jsp');</script><%
}else{
String mark = request.getParameter("mark");
String id = request.getParameter("id");
ArrayList feiji = array.getFeiji(id);
 %>
<script language="JavaScript">
function check() {
	var pattern = /^[a-zA-Z0-9]+$/;
	var ints = /^[0-9]+$/;
	var emails = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
	if (document.form1.banci.value == "" ) 
	{
		alert("请输入班次!");
		document.form1.banci.focus();
		return false;
	}
	if (document.form1.gongsi.value == "" ) 
	{
		alert("请输入所属航空公司!");
		document.form1.gongsi.focus();
		return false;
	}
	if (document.form1.qifeichengshi.value == "")  
	{
		alert("请输入起飞城市!");
		document.form1.qifeichengshi.focus();
		return false;
	}
	if (document.form1.qifeijichang.value == "" ) 
	{
		alert("请输入起飞机场!");
		document.form1.qifeijichang.focus();
		return false;
	}
	if (document.form1.qifeitime.value == "" ) 
	{
		alert("请输入起飞时间!");
		document.form1.qifeitime.focus();
		return false;
	}
	if (document.form1.daodachengshi.value == "")  
	{
		alert("请输入到达城市!");
		document.form1.daodachengshi.focus();
		return false;
	}
	if (document.form1.daodajichang.value == "" ) 
	{
		alert("请输入到达机场!");
		document.form1.daodajichang.focus();
		return false;
	}
	if (document.form1.daodatime.value == "" ) 
	{
		alert("请输入到达时间!");
		document.form1.daodatime.focus();
		return false;
	}
	if (!ints.test(document.form1.jingji.value))  
	{
		alert("经济舱价格只能为整数!");
		document.form1.jingji.focus();
		return false;
	}
	if (!ints.test(document.form1.jingjisums.value))  
	{
		alert("经济舱票数只能为整数!");
		document.form1.jingjisums.focus();
		return false;
	}
	if (!ints.test(document.form1.toudeng.value))  
	{
		alert("头等舱价格只能为整数!");
		document.form1.toudeng.focus();
		return false;
	}
	if (!ints.test(document.form1.toudengsums.value))  
	{
		alert("头等舱票数只能为整数!");
		document.form1.toudengsums.focus();
		return false;
	}
	if (document.form1.beizhu.value == "" ) 
	{
		alert("请输入备注说明!");
		document.form1.beizhu.focus();
		return false;
	}
}
</script>
<style>
<!--
.it1 {
	background-color: #F6F6F6;
	border-top-color: #999;
	border-right-color: #999;
	border-bottom-color: #999;
	border-left-color: #999;
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
}
.it2 {
	background-color: #F9FC81;
	border-top-color: #999;
	border-right-color: #999;
	border-bottom-color: #999;
	border-left-color: #999;
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
}

h3 {
	font-size: 14px;
	font-weight: bold;
}
pre, p {
	color: #1E7ACE;
	margin: 4px;
}
input, select, textarea {
	padding: 1px;
	margin: 2px;
	font-size: 11px;
}
.buttom {
	padding: 1px 10px;
	font-size: 12px;
	border: 1px #1E7ACE solid;
	background: #D0F0FF;
}
#formwrapper {
	width: 700px;
	margin: 15px auto;
	padding: 20px;
	text-align: left;
	border: 1px #1E7ACE solid;
}
fieldset {
	padding: 10px;
	margin-top: 5px;
	border: 1px solid #1E7ACE;
	background: #fff;
}
fieldset legend {
	color: #1E7ACE;
	font-weight: bold;
	padding: 3px 20px 3px 20px;
	border: 1px solid #1E7ACE;
	background: #fff;
}
fieldset label {
	float: left;
	width: 120px;
	text-align: right;
	padding: 4px;
	margin: 1px;
}
fieldset div {
	clear: left;
	margin-bottom: 2px;
}
.enter {
	text-align: center;
}
.clear {
	clear: both;
}
-->
</style>
</head>
<%
String message = (String)request.getAttribute("message");
	if(message == null){
		message = "";
	}
	if (!message.trim().equals("")){
		out.println("<script language='javascript'>");
		out.println("alert('"+message+"');");
		out.println("</script>");
	}
	request.removeAttribute("message");
%>  
  <body>
    <table width="920" border="0" cellspacing="0" cellpadding="0" background="<%=path%>/img/all_bg.jpg" height="420">
  <tr>
    <td class="border_left border_right border_bottom" height="400" valign="top" align="center">
		<table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="5"></td>
          </tr>
        </table>
      <div id="formwrapper">
        <h3> 航班信息 </h3>
        <form action="<%=path %>/feiji/add.do" method="post" name="form1" onSubmit="return check()">
         
          <fieldset>
            <div>
              <label for="reallyname">班次： </label>
              <input name="banci" value="" type="text" class="it1" onBlur="this.className='it1';" style="WIDTH: 320px; FONT-FAMILY: Arial" onFocus="this.className='it2';">
              <br />
            </div>
            <div>
              <label for="reallyname">航空公司： </label>
              <input name="gongsi" value="" type="text" class="it1" onBlur="this.className='it1';" style="WIDTH: 320px; FONT-FAMILY: Arial" onFocus="this.className='it2';">
              <br />
            </div>
            <div>
              <label for="reallyname"> 起飞城市： </label>
              <input name="qifeichengshi" value="" type="text" class="it1" onBlur="this.className='it1';" style="WIDTH: 320px; FONT-FAMILY: Arial" onFocus="this.className='it2';">
              <br />
            </div>
            <div>
              <label for="reallyname"> 起飞机场： </label>
              <input name="qifeijichang" value="" type="text" class="it1" onBlur="this.className='it1';" style="WIDTH: 320px; FONT-FAMILY: Arial" onFocus="this.className='it2';">
              <br />
            </div>
            <div>
              <label for="reallyname"> 起飞时间： </label>
              <input name="qifeitime" value="" type="text" class="it1" onBlur="this.className='it1';" style="WIDTH: 320px; FONT-FAMILY: Arial" onFocus="this.className='it2';" id="d4321" />
            </div>
            <div>
              <label for="reallyname"> 到达城市： </label>
              <input name="daodachengshi" value="" type="text" class="it1" onBlur="this.className='it1';" style="WIDTH: 320px; FONT-FAMILY: Arial" onFocus="this.className='it2';">
              <br />
            </div>
            <div>
              <label for="reallyname"> 到达机场： </label>
              <input name="daodajichang" value="" type="text" class="it1" onBlur="this.className='it1';" style="WIDTH: 320px; FONT-FAMILY: Arial" onFocus="this.className='it2';">
              <br />
            </div>
            <div>
              <label for="reallyname"> 到达时间： </label>
              <input name="daodatime" value="" type="text" class="it1" onBlur="this.className='it1';" style="WIDTH: 320px; FONT-FAMILY: Arial" onFocus="this.className='it2';" id="d4322" />
              <br />
            </div>
             <div>
              <label for="reallyname"> 飞行里程(KM)： </label>
              <input name="distance" value="" type="text" class="it1" onBlur="this.className='it1';" style="WIDTH: 320px; FONT-FAMILY: Arial" onFocus="this.className='it2';">
              <br />
            </div>           
            <div>
              <label for="reallyname"> 经济舱价格： </label>
              <input name="jingji" value="" type="text" class="it1" onBlur="this.className='it1';" style="WIDTH: 320px; FONT-FAMILY: Arial" onFocus="this.className='it2';">
              <br />
            </div>
            <div>
              <label for="reallyname"> 经济舱票数： </label>
              <input name="jingjisums" value="" type="text" class="it1" onBlur="this.className='it1';" style="WIDTH: 320px; FONT-FAMILY: Arial" onFocus="this.className='it2';">
              <br />
            </div>
            <div>
              <label for="reallyname"> 头等舱价格： </label>
              <input name="toudeng" value="" type="text" class="it1" onBlur="this.className='it1';" style="WIDTH: 320px; FONT-FAMILY: Arial" onFocus="this.className='it2';">
              <br />
            </div>
            <div>
              <label for="reallyname"> 头等舱票数： </label>
              <input name="toudengsums" value="" type="text" class="it1" onBlur="this.className='it1';" style="WIDTH: 320px; FONT-FAMILY: Arial" onFocus="this.className='it2';">
              <br />
            </div>
            <div>
              <label for="reallyname"> 备注说明： </label>
              <textarea name="beizhu" cols="70" rows="6"class="it1" onBlur="this.className='it1';" style="FONT-FAMILY: Arial" onFocus="this.className='it2';">
            
              </textarea><br />
            </div>
            <div class="enter">
              <input type="submit" class="buttom" value="提交" />
              <input type="reset" class="buttom" value="重置" />
            </div>
          </fieldset>
        </form>
      </div>
        </td>
  </tr>
</table>
</body>
  <jsp:include flush="true" page="/admin/bottom.jsp"/>
</html>
<%} %>
